import React from 'react';
import {Provider} from 'mobx-react';
import {Route} from 'react-router';

import ViewCom from './components/View';
import SettingCom from './components/Setting';
import stores from './stores/';
import { WeaLocaleProvider } from 'ecCom';

const getLabel = WeaLocaleProvider.getLabel;

class View extends React.Component {
    render() {
        return <Provider ecId={`${this && this.props && this.props.ecId || ''}_Provider@am55b4`} {...stores}><ViewCom ecId={`${this && this.props && this.props.ecId || ''}_ViewCom@su6q05`} {...this.props}/></Provider>;
    }
}

class Setting extends React.Component {
    render() {
        return <Provider ecId={`${this && this.props && this.props.ecId || ''}_Provider@7lsx7n`} {...stores}><SettingCom ecId={`${this && this.props && this.props.ecId || ''}_SettingCom@taa6yd`} {...this.props}/></Provider>;
    }
}

class Test extends React.Component {
    render() {
        return <Provider ecId={`${this && this.props && this.props.ecId || ''}_Provider@wdlknd`} {...stores}><TestCom ecId={`${this && this.props && this.props.ecId || ''}_TestCom@2o135p`} {...this.props}/></Provider>;
    }
}

module.exports = {
    Route: (
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@sm7oka`} path="performance" component={props => props.children}>
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@ea19u7`} path="view" component={View}/>
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@lxpry6`} path="setting" component={Setting}/>
        </Route>
    ),
    com: {
        View,
        Setting,
    },
    titles: {
        'View': getLabel(508748, '门户自定义开发绩效元素'),
        'Setting': getLabel(508749, '门户自定义开发绩效元素设置'),
    }
};
